<?php

/**
 * LoginForm class.
 * LoginForm is the data structure for keeping
 * user login form data. It is used by the 'login' action of 'SiteController'.
 */
class UserinfoForm extends CFormModel
{
	public $name;
	public $gender;
	public $city;
	public $desc;

	private $_identity;

	/**
	 * Declares the validation rules.
	 * The rules state that username and password are required,
	 * and password needs to be authenticated.
	 */
	public function rules()
	{
		return array(
			// username and password are required
			array('name, city', 'required'), 
//			array('email', 'email'),
			// rememberMe needs to be a boolean
//			array('rememberMe', 'boolean'),
			// password needs to be authenticated
//			array('password', 'authenticate'),
//			array('password1', 'compare', 'compareAttribute'=>'password'),
		);
	}

	/**
	 * Declares attribute labels.
	 */
	public function attributeLabels()
	{
		return array(
			'name'=>'昵称',
			'gender'=>'性别',
			'city'=>'城市',
			'desc'=>'简述',
		);
	}
}
